package com.caption.auth.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.caption.auth.model.entity.SysPermission;
import com.caption.auth.model.entity.SysRole;
import com.caption.auth.model.entity.SysUser;
import java.util.List;

public interface SysUserService extends IService<SysUser> {
    /**
     * 查询用户信息
     * @param username
     * @return
     */
    SysUser selectByUserName(String username);

    /**
     * 用户手机号查询用户
     * @param phone
     * @return
     */
    SysUser selectByPhone(String phone);

    /**
     * 查询用户角色
     *
     * @param userId
     * @return
     */
    List<SysRole> selectRoleByUserId(Long userId);

    /**
     * 查询用户权限
     *
     * @param userId
     * @return
     */
    List<SysPermission> selectPermissionByUserId(Long userId);


}
